home *** CD-ROM | disk | FTP | other *** search
- global gTextLanguage, gHighLightPosC, gCurrentPosC, gNbItemC, gCurrentFieldC, gThemeObj, gTitleObj, gContenuPicObj, gScreenStatus, gReturnContenu, gDataPath, gLabelLang, gContenuChange, gCurrentLabel, gThemeList, gThemeSound, gInterfaceLanguage
-
- on ShowContenu fromDialog
- set LstSpriteVisible to [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
- watchCursor()
- if (gScreenStatus = #ILLUSTRATION) or (gScreenStatus = #REGION) or (gScreenStatus = #ZOOM) then
- FlushAllAnimationsData()
- ResetActiveLabels()
- ResetScreenLists()
- EraseAll()
- end if
- addRAMobjects(#CastList, [10099, 10100, 10101, 10528, 10531, 10532, 10533, 10534, 10539, 10541, 10542, 10543, 10551, 10552, 10553, 10554, 10559, 10560, 10562, 10566, 10568, 10569])
- if gContenuChange then
- set the text of cast 10099 to " "
- set the text of cast 10100 to " "
- set the text of cast 10101 to " "
- set gHighLightPosC to [0, 0, 0]
- setAt(LstSpriteVisible, 9, 1)
- else
- setAt(LstSpriteVisible, ((gCurrentFieldC - 1) * 7) + 9, 1)
- end if
- repeat with i = 1 to 46
- set the visible of sprite i to getAt(LstSpriteVisible, i)
- set the cursor of sprite i to 0
- end repeat
- if not fromDialog then
- set gReturnContenu to gScreenStatus
- end if
- set gScreenStatus to #CONTENU
- UpdateLabelC()
- set the textSize of field 10099 to 10
- set the textHeight of field 10099 to 12
- set the textSize of field 10100 to 10
- set the textHeight of field 10100 to 12
- set the textSize of field 10101 to 10
- set the textHeight of field 10101 to 12
- set gThemeList to []
- set gThemeSound to []
- set CurrentPath to gDataPath
- if gTextLanguage = 1 then
- set gThemeObj to FileIO(mnew, "read", CurrentPath & "thems.001")
- set gTitleObj to FileIO(mnew, "read", CurrentPath & "titles.001")
- else
- if gTextLanguage = 2 then
- set gThemeObj to FileIO(mnew, "read", CurrentPath & "thems.002")
- set gTitleObj to FileIO(mnew, "read", CurrentPath & "titles.002")
- else
- if gTextLanguage = 3 then
- set gThemeObj to FileIO(mnew, "read", CurrentPath & "thems.003")
- set gTitleObj to FileIO(mnew, "read", CurrentPath & "titles.003")
- end if
- end if
- end if
- set the itemDelimiter to ","
- set i to 0
- repeat while i < 42
- set ThemeLine to gThemeObj(mReadLine)
- add(gThemeList, item 1 of ThemeLine)
- delete item 1 of ThemeLine
- add(gThemeSound, item 1 of ThemeLine)
- delete item 1 of ThemeLine
- set i to i + 1
- end repeat
- set the itemDelimiter to ","
- if objectp(gThemeObj) then
- gThemeObj(mdispose)
- end if
- setAt(gNbItemC, 1, count(gThemeList))
- DuplicateCastFIX(10873 + (2 * (gInterfaceLanguage - 1)), 10868)
- set the locH of sprite 34 to 457
- set the locV of sprite 34 to 21
- set the regPoint of cast 10868 to point(0, 0)
- gotoframe(45, 1)
- updateStage()
- set theLine to getAt(gHighLightPosC, 1) - getAt(gCurrentPosC, 1)
- if (theLine >= 0) and (theLine < 21) then
- set the locV of sprite 11 to ((getAt(gHighLightPosC, 1) - getAt(gCurrentPosC, 1)) * 12) + SpriteTop(10) + 1
- set the visible of sprite 11 to 1
- end if
- set theLine to getAt(gHighLightPosC, 2) - getAt(gCurrentPosC, 2)
- if (theLine >= 0) and (theLine < 21) then
- set the locV of sprite 18 to ((getAt(gHighLightPosC, 2) - getAt(gCurrentPosC, 2)) * 12) + SpriteTop(17) + 1
- set the visible of sprite 18 to 1
- end if
- set theLine to getAt(gHighLightPosC, 3) - getAt(gCurrentPosC, 3)
- if (theLine >= 0) and (theLine < 21) then
- set the locV of sprite 25 to ((getAt(gHighLightPosC, 3) - getAt(gCurrentPosC, 3)) * 12) + SpriteTop(24) + 1
- set the visible of sprite 25 to 1
- end if
- UpdateCursorC(1, getAt(gCurrentPosC, 1))
- UpdateCursorC(2, getAt(gCurrentPosC, 2))
- UpdateCursorC(3, getAt(gCurrentPosC, 3))
- set the castNum of sprite 5 to 10001
- set the castNum of sprite 6 to 10001
- set the castNum of sprite 7 to 10001
- set the height of sprite 10 to 252
- set the height of sprite 17 to 252
- set the height of sprite 24 to 252
- set the stretch of sprite 11 to 1
- set the height of sprite 11 to 12
- set the width of sprite 11 to the width of sprite 10
- set the locH of sprite 11 to getAt(the rect of sprite 10, 1)
- set the stretch of sprite 18 to 1
- set the height of sprite 18 to 12
- set the width of sprite 18 to the width of sprite 17
- set the locH of sprite 18 to getAt(the rect of sprite 17, 1)
- set the stretch of sprite 25 to 1
- set the height of sprite 25 to 12
- set the width of sprite 25 to the width of sprite 24
- set the locH of sprite 25 to getAt(the rect of sprite 24, 1)
- SpriteHandCursor(3)
- ResetNavigPopUp()
- updateStage()
- DuplicateCastFIX(10001, 10868)
- if (the text of cast 10099 = " ") or gContenuChange then
- set the text of cast 10100 to " "
- set the text of cast 10101 to " "
- ActiveButton(1)
- SetWinContenu1(1, 3)
- end if
- if getAt(gHighLightPosC, 1) > 0 then
- if getAt(gHighLightPosC, 2) > 0 then
- if getAt(gHighLightPosC, 3) > 0 then
- set the visible of sprite 4 to 1
- SpriteHandCursor(4)
- ActiveButton(2)
- else
- ActiveButton(1)
- end if
- else
- ActiveButton(1)
- end if
- else
- ActiveButton(1)
- end if
- if getAt(gHighLightPosC, 1) > 0 then
- if getAt(gNbItemC, 2) > 21 then
- set the visible of sprite 45 to 0
- end if
- if getAt(gHighLightPosC, 2) > 0 then
- if getAt(gNbItemC, 3) > 21 then
- set the visible of sprite 46 to 0
- end if
- end if
- end if
- if gContenuChange then
- ActiveFieldC(1)
- set gContenuChange to 0
- else
- updateStage()
- end if
- cursor(-1)
- end
-
- on CloseContenu
- gTitleObj(mdispose)
- set the visible of sprite 4 to 1
- set the visible of sprite 5 to 1
- set the visible of sprite 6 to 1
- set gLabelLang to gTextLanguage
- set the stretch of sprite 11 to 0
- set the stretch of sprite 18 to 0
- set the stretch of sprite 25 to 0
- end
-
- on KeyDownContenu
- if (gCurrentFieldC < 4) and (gCurrentFieldC > 0) then
- set NbElement to getAt(gNbItemC, gCurrentFieldC)
- set HighL to getAt(gHighLightPosC, gCurrentFieldC)
- set CurrentP to getAt(gCurrentPosC, gCurrentFieldC)
- end if
- if the keyCode = 125 then
- if (gCurrentFieldC = 1) and not ((HighL = NbElement) and (CurrentP = (NbElement - min(NbElement - 1, 20)))) then
- SetWinContenu1(1, 6)
- repeat while the shiftDown
- SetWinContenu1(1, 6)
- end repeat
- SetWinContenu1(2, 1)
- FindTitles(getAt(gHighLightPosC, 1))
- setAt(gCurrentPosC, 2, 1)
- setAt(gHighLightPosC, 2, 0)
- SetWinContenu1(2, 3)
- else
- if (gCurrentFieldC = 2) and not ((HighL = NbElement) and (CurrentP = (NbElement - min(NbElement - 1, 20)))) then
- SetWinContenu1(2, 6)
- repeat while the shiftDown
- SetWinContenu1(2, 6)
- end repeat
- FindPicsC(getAt(gHighLightPosC, 2))
- setAt(gCurrentPosC, 3, 1)
- setAt(gHighLightPosC, 3, 0)
- SetWinContenu1(3, 3)
- else
- if (gCurrentFieldC = 3) and not ((HighL = NbElement) and (CurrentP = (NbElement - min(NbElement - 1, 20)))) then
- SetWinContenu1(3, 6)
- repeat while the shiftDown
- SetWinContenu1(3, 6)
- end repeat
- end if
- end if
- end if
- dontPassEvent()
- abort()
- end if
- if the keyCode = 126 then
- if (gCurrentFieldC = 1) and not ((HighL = 1) and (CurrentP = 1)) then
- SetWinContenu1(1, 5)
- repeat while the shiftDown
- SetWinContenu1(1, 5)
- end repeat
- SetWinContenu1(2, 1)
- FindTitles(getAt(gHighLightPosC, 1))
- setAt(gCurrentPosC, 2, 1)
- setAt(gHighLightPosC, 2, 0)
- SetWinContenu1(2, 3)
- else
- if (gCurrentFieldC = 2) and not ((HighL = 1) and (CurrentP = 1)) then
- SetWinContenu1(2, 5)
- repeat while the shiftDown
- SetWinContenu1(2, 5)
- end repeat
- FindPicsC(getAt(gHighLightPosC, 2))
- setAt(gCurrentPosC, 3, 1)
- setAt(gHighLightPosC, 3, 0)
- SetWinContenu1(3, 3)
- else
- if (gCurrentFieldC = 3) and not ((HighL = 1) and (CurrentP = 1)) then
- SetWinContenu1(3, 5)
- repeat while the shiftDown
- SetWinContenu1(3, 5)
- end repeat
- end if
- end if
- end if
- dontPassEvent()
- abort()
- end if
- if the keyCode = 115 then
- if (gCurrentFieldC = 1) and not ((HighL = 1) and (CurrentP = 1)) then
- setAt(gCurrentPosC, 1, 1)
- setAt(gHighLightPosC, 1, 1)
- SetWinContenu1(1, 3)
- SetWinContenu1(2, 1)
- set ListResult to field 10099
- FindTitles(getAt(gHighLightPosC, 1))
- setAt(gCurrentPosC, 2, 1)
- setAt(gHighLightPosC, 2, 0)
- SetWinContenu1(2, 3)
- else
- if (gCurrentFieldC = 2) and not ((HighL = 1) and (CurrentP = 1)) then
- setAt(gCurrentPosC, 2, 1)
- setAt(gHighLightPosC, 2, 1)
- SetWinContenu1(2, 3)
- FindPicsC(1)
- setAt(gCurrentPosC, 3, 1)
- setAt(gHighLightPosC, 3, 0)
- SetWinContenu1(3, 3)
- else
- if (gCurrentFieldC = 3) and not ((HighL = 1) and (CurrentP = 1)) then
- setAt(gCurrentPosC, 3, 1)
- setAt(gHighLightPosC, 3, 1)
- SetWinContenu1(3, 3)
- end if
- end if
- end if
- dontPassEvent()
- abort()
- end if
- if the keyCode = 119 then
- if (gCurrentFieldC = 1) and not ((HighL = NbElement) and (CurrentP = (NbElement - min(NbElement - 1, 20)))) then
- setAt(gCurrentPosC, 1, getAt(gNbItemC, 1) - 20)
- setAt(gHighLightPosC, 1, getAt(gNbItemC, 1))
- SetWinContenu1(1, 3)
- SetWinContenu1(2, 1)
- set ListResult to field 10099
- FindTitles(getAt(gHighLightPosC, 1))
- setAt(gCurrentPosC, 2, 1)
- setAt(gHighLightPosC, 2, 0)
- SetWinContenu1(2, 3)
- else
- if (gCurrentFieldC = 2) and not ((HighL = NbElement) and (CurrentP = (NbElement - min(NbElement - 1, 20)))) then
- if getAt(gNbItemC, 2) < 21 then
- setAt(gCurrentPosC, 2, 1)
- else
- setAt(gCurrentPosC, 2, getAt(gNbItemC, 2) - 20)
- end if
- setAt(gHighLightPosC, 2, getAt(gNbItemC, 2))
- SetWinContenu1(2, 3)
- FindPicsC(getAt(gHighLightPosC, 2))
- setAt(gCurrentPosC, 3, 1)
- setAt(gHighLightPosC, 3, 0)
- SetWinContenu1(3, 3)
- else
- if (gCurrentFieldC = 3) and not ((HighL = NbElement) and (CurrentP = (NbElement - min(NbElement - 1, 20)))) then
- if getAt(gNbItemC, 3) < 21 then
- setAt(gCurrentPosC, 3, 1)
- else
- setAt(gCurrentPosC, 3, getAt(gNbItemC, 3) - 20)
- end if
- setAt(gHighLightPosC, 3, getAt(gNbItemC, 3))
- SetWinContenu1(3, 3)
- end if
- end if
- end if
- dontPassEvent()
- abort()
- end if
- if the keyCode = 116 then
- if (gCurrentFieldC = 1) and not ((HighL = 1) and (CurrentP = 1)) then
- SetWinContenu2(1, 12)
- repeat while the shiftDown
- SetWinContenu2(1, 12)
- end repeat
- SetWinContenu1(2, 1)
- FindTitles(getAt(gHighLightPosC, 1))
- setAt(gCurrentPosC, 2, 1)
- setAt(gHighLightPosC, 2, 0)
- SetWinContenu1(2, 3)
- else
- if (gCurrentFieldC = 2) and not ((HighL = 1) and (CurrentP = 1)) then
- SetWinContenu2(2, 12)
- repeat while the shiftDown
- SetWinContenu2(2, 12)
- end repeat
- FindPicsC(getAt(gHighLightPosC, 2))
- setAt(gCurrentPosC, 3, 1)
- setAt(gHighLightPosC, 3, 0)
- SetWinContenu1(3, 3)
- else
- if (gCurrentFieldC = 3) and not ((HighL = 1) and (CurrentP = 1)) then
- SetWinContenu2(3, 12)
- repeat while the shiftDown
- SetWinContenu2(3, 12)
- end repeat
- end if
- end if
- end if
- dontPassEvent()
- abort()
- end if
- if the keyCode = 121 then
- if (gCurrentFieldC = 1) and not ((HighL = NbElement) and (CurrentP = (NbElement - min(NbElement - 1, 20)))) then
- SetWinContenu2(1, 13)
- repeat while the shiftDown
- SetWinContenu2(1, 13)
- end repeat
- SetWinContenu1(2, 1)
- FindTitles(getAt(gHighLightPosC, 1))
- setAt(gCurrentPosC, 2, 1)
- setAt(gHighLightPosC, 2, 0)
- SetWinContenu1(2, 3)
- else
- if (gCurrentFieldC = 2) and not ((HighL = NbElement) and (CurrentP = (NbElement - min(NbElement - 1, 20)))) then
- SetWinContenu2(2, 13)
- repeat while the shiftDown
- SetWinContenu2(2, 13)
- end repeat
- FindPicsC(getAt(gHighLightPosC, 2))
- setAt(gCurrentPosC, 3, 1)
- setAt(gHighLightPosC, 3, 0)
- SetWinContenu1(3, 3)
- else
- if (gCurrentFieldC = 3) and not ((HighL = NbElement) and (CurrentP = (NbElement - min(NbElement - 1, 20)))) then
- SetWinContenu2(3, 13)
- repeat while the shiftDown
- SetWinContenu2(3, 13)
- end repeat
- end if
- end if
- end if
- dontPassEvent()
- abort()
- end if
- if the key = " " then
- dontPassEvent()
- abort()
- end if
- if (the keyCode = 123) or (the keyCode = 124) then
- return
- end if
- if the machineType <> 256 then
- KeyContenu_Mac()
- else
- KeyContenu_PC()
- end if
- if (charToNum(the key) < 33) or (charToNum(the key) > 126) or the commandDown then
- MenuKey(the key)
- end if
- end
-